package ink.ykb.demo.permission.entity;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import org.beetl.sql.core.annotatoin.Table;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
/* 
* 权限
* gen by beetlsql 2019-09-20
*/
@Table(name="test.rule")
public class Rule  implements Serializable {
	
	private static final long serialVersionUID = 1L;
	// alias
	public static final String ALIAS_id = "id";
	public static final String ALIAS_parent_id = "parent_id";
	public static final String ALIAS_method = "method";
	public static final String ALIAS_type = "type";
	public static final String ALIAS_code = "code";
	public static final String ALIAS_name = "name";
	public static final String ALIAS_service_name = "service_name";
	public static final String ALIAS_uri = "uri";
	public static final String ALIAS_create_time = "create_time";
	
	/*
	主键
	*/
	@JsonSerialize(using=ToStringSerializer.class)
	private Long id ;
	/*
	父级主键
	 */
	private Long parentId ;
	/*
	请求类型，0：GET，1：POST，2：PUT，3：DELETE
	*/
	private Integer method ;
	/*
	权限类型，0：接口权限，1:菜单权限
	*/
	private Integer type ;
	/*
	编号
	*/
	private String code ;
	/*
	名称
	*/
	private String name ;
	/*
	服务名
	*/
	private String serviceName ;
	/*
	访问地址
	*/
	private String uri ;
	/*
	创建时间
	*/
	private Date createTime ;
	
	
	/**
	 * 子菜单
	 */
	private List<Rule> childs;
	
	public Rule() {
	}
	

	public List<Rule> getChilds() {
		return childs;
	}

	public void setChilds(List<Rule> childs) {
		this.childs = childs;
	}



	/**
	* 主键
	*@return 
	*/
	public Long getId(){
		return  id;
	}
	/**
	* 主键
	*@param  id
	*/
	public void setId(Long id ){
		this.id = id;
	}
	
	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	/**
	* 请求类型，0：GET，1：POST，2：PUT，3：DELETE
	*@return 
	*/
	public Integer getMethod(){
		return  method;
	}
	/**
	* 请求类型，0：GET，1：POST，2：PUT，3：DELETE
	*@param  method
	*/
	public void setMethod(Integer method ){
		this.method = method;
	}
	
	/**
	* 权限类型，0：接口权限，1:菜单权限
	*@return 
	*/
	public Integer getType(){
		return  type;
	}
	/**
	* 权限类型，0：接口权限，1:菜单权限
	*@param  type
	*/
	public void setType(Integer type ){
		this.type = type;
	}
	
	/**
	* 编号
	*@return 
	*/
	public String getCode(){
		return  code;
	}
	/**
	* 编号
	*@param  code
	*/
	public void setCode(String code ){
		this.code = code;
	}
	
	/**
	* 名称
	*@return 
	*/
	public String getName(){
		return  name;
	}
	/**
	* 名称
	*@param  name
	*/
	public void setName(String name ){
		this.name = name;
	}
	
	/**
	* 服务名
	*@return 
	*/
	public String getServiceName(){
		return  serviceName;
	}
	/**
	* 服务名
	*@param  serviceName
	*/
	public void setServiceName(String serviceName ){
		this.serviceName = serviceName;
	}
	
	/**
	* 访问地址
	*@return 
	*/
	public String getUri(){
		return  uri;
	}
	/**
	* 访问地址
	*@param  uri
	*/
	public void setUri(String uri ){
		this.uri = uri;
	}
	
	/**
	* 创建时间
	*@return 
	*/
	public Date getCreateTime(){
		return  createTime;
	}
	/**
	* 创建时间
	*@param  createTime
	*/
	public void setCreateTime(Date createTime ){
		this.createTime = createTime;
	}
	

}
